<?php $this->load->view(TEMPLATE_NAME.'/front/header'); ?>
<?php $this->load->view(TEMPLATE_NAME.'/front/side_left'); ?>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery.validate.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    var result = true;    
    $.validator.addMethod("addressCheck", function() {                                                
        $.post("<?php echo site_url('json_request/check_username_json')?>" ,{
            username: $('#username').val()                                  
        },function(data){
            result = (data=="TRUE") ? true : false;
        }, "json");
            return result;            
    });
    $("#forgot_form").validate({                
        onkeyup: false,                
        rules: {            
            username: {
                required : true,
                addressCheck : true    
            }          
        },        
        messages: {            
            username: {
                required : "Please input a E-mail Address",
                addressCheck : "Error - That e-mail does not exist in database. Try another."    
            }    
        }          
    });    
});
</script>
<style type="text/css" title="text/css">
/* Style for jquery validation */
#forgot_form label.error {    
    background-color: #CF118C;    
    color: #FFF;    
    padding: 5px 10px;    
    margin:0 0 4px 257px;    
    float: none;    
    line-height:19px;
    position:relative;
    font-weight: normal;
}

input[type="text"], input[type="password"]{
	text-align:left;
	}
	
</style>
<div class="page">
<h2>Advertiser Log-In <!--Looks like you need some help?--></h2>
<p class="f15 purple">Password reminder - input your e-mail address below</p> <!--You can retrieve your password<br/>-->
<!--<span class="purple">We will <strong>NEVER</strong> share, trade or disclose any information with any third party - <strong>EVER</strong>!</span></p>-->
<hr />
<p class="f15">Input your e-mail address to have your password resent to you.</p>
<?php 
$form_atribute = array('id' => 'forgot_form');
echo form_open('directory/forgot_password',$form_atribute);
 ?>
<div class="dir">
<label><b>E-Mail Address:</b> <span class="purple">(required)</span></label> <?php echo form_input(array('name' => 'username', 'id' => 'username')); ?><br />
<?php echo form_error('username','<p id="error_recaptcha" class="alert alert3"><strong>Error:</strong>','</p>') ?>
<!--
<p class="inform f12"><strong>Ok, we've sent the instructions to your email. Go check it!</strong> <br/>
You can use a nickname or your real name. <span class="purple">(This can be changed at any time.)</span></p>
-->
<p class="bsu">
<?php 
$form_button = array(
  'type'=>'submit',
  'name'=>'submit',
  'value'=>'submit',
  'content'=>'Submit',
);
echo form_button($form_button) ?>
</p>
<p class="f15">
Not registered to advertise in directory? <strong><?php echo anchor('directory/advertise','Sign up now!'); ?></strong> </p>
<hr/>
</div><!-- dir -->
<?php echo form_close(); ?><!-- formstep -->
<div class="clear"></div>
<?php $this->load->view(TEMPLATE_NAME.'/front/footer_menu'); ?>
</div>
<?php $this->load->view(TEMPLATE_NAME.'/front/side_right'); ?>
<?php $this->load->view(TEMPLATE_NAME.'/front/footer'); ?>
